package com.example.zhangxin.myhuatuob2b;

import android.app.Application;
import android.content.Context;

import com.example.zhangxin.myhuatuob2b.utils.PreferenceUtils;

import org.xutils.x;

/**
 * Created by ZhangXin on 2016/10/11.
 */

public class MyApplication extends Application {

    private static MyApplication application;
    public MyApplication() {
        application = this;
    }

    public static Context getAppcation(){
        return application;
    }

    public static String getLoginKey(){

        return PreferenceUtils.getString(application,"key","");
    }

    public static String getMember_role() {
        String member_role = PreferenceUtils.getString(application,"member_role", "");
        return member_role;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        x.Ext.init(this);
    }
}
